/*
 * main.c
 *
 *  Created on: Jan 29, 2014
 *      Author: jiang
 */




/*
 * main.cpp
 *
 *  Created on: Oct 25, 2013
 *      Author: jiang
 */

#include <stdio.h>
#include "aln.h"
#include "index.h"
#include "util.h"


int main(int argc, char *argv[])
{
        int ret;
        opt_t *options;

        options = (opt_t*)malloc(sizeof(opt_t));

        options->chunck_size = (0x2ffff);
        options->firstZ = 18;
        options->allowMismatch = 1;
          //That depends on read length, for test, let's make it
        options->extend_len = 3;
        options->top_Z = 2;  //consider top_Z high frequency positions. SET very big to achieve high accuracy

        options->ert  = 0.1;
        options->indelrt =0.2;
        options->distinctPercent = 0.1;
        options->good_enough_percent_support = 0.25;
        //options->kmerLen  = 7;


        options->a = 1;
        options->b = 3;
        options->q = 5;
        options->r = 2;
        options->bw = 33;

        if (strcmp(argv[1], "map") == 0)
                        ret = dmap_map(argv[2], argv[3],options);
        if (strcmp(argv[1], "index") == 0)
        	ret = dmap_index_ref(argv[2],options);
        /*
        else
        {
                        fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);

        }
        */
        fflush(stdout);
        return 0;

}

